package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/assistDelivery")
public class wmsAssistDeliveryRouter {
    @Autowired
    SysMenuService menuService;
    //协助发货页面
    @RequestMapping(value = "/wmsAssistDelivery/{menu}")
    public  String  toKuwei(@PathVariable("menu") String menu, Model model){
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "special/wmsAssistDelivery/wmsAssistDelivery";
    }
    /*跳转到创建装车单页面*/
    @RequestMapping(value = "/creat")
    public String toCreat(String ids, Model model) {
        System.out.println(ids);
        model.addAttribute("ids",ids);
        return "special/wmsAssistDelivery/creat";
    }
    /*跳转到协助称重页面*/
    @RequestMapping(value = "/assist")
    public String toAssist(String ids, Model model) {
        System.out.println(ids);
        model.addAttribute("ids",ids);
        return "special/wmsAssistDelivery/assist";
    }
    /*跳转到下发PDA任务页面*/
    @RequestMapping(value = "/createPda")
    public String createPda(String ids, Model model) {
        model.addAttribute("ids",ids);
        return "special/wmsAssistDelivery/createPda";
    }
    /*跳转到编辑页面*/
    @RequestMapping(value = "/edit")
    public String edit(String id,String bz,String fhfs,String kddh,String sjzl,String yf, Model model) {
        model.addAttribute("id",id);
        model.addAttribute("bz",bz);
        model.addAttribute("fhfs",fhfs);
        model.addAttribute("kddh",kddh);
        model.addAttribute("sjzl",sjzl);
        model.addAttribute("yf",yf);
        return "special/wmsAssistDelivery/edit";
    }
    //附件管理
    @RequestMapping(value = "/getUpload")
    public String getUpload(String id, Model model) {
        model.addAttribute("id",id);
        return "special/wmsAssistDelivery/upload";
    }
}
